SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant`;
CREATE TABLE `sys_tenant` (
  `Id` 			bigint(20) NOT NULL DEFAULT '0' COMMENT '唯一编号',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  `Name` 		varchar(64) NOT NULL COMMENT '租户名称',
  `Person` 		varchar(64) NOT NULL COMMENT '负责人',
  `Phone` 		varchar(32) DEFAULT NULL COMMENT '手机号码',
  `Account` 	varchar(32) NOT NULL COMMENT '默认账号',
  `PassWord` 	varchar(64) NOT NULL COMMENT '密码',
  `Status` 		tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `IsDel` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='租户管理';

-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
BEGIN;
INSERT INTO `sys_tenant` VALUES (1300000000001, 0, '系统租户', '管理员', '15888888888', 'admin', '123456a!', 1, 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin');
COMMIT;

-- ----------------------------
-- Table structure for sys_organize
-- ----------------------------
DROP TABLE IF EXISTS `sys_organize`;
CREATE TABLE `sys_organize` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `ParentId` 		bigint(20) NOT NULL COMMENT '父节点',
  `Name` 			varchar(32) NOT NULL COMMENT '部门名称',
  `Number` 			varchar(32) DEFAULT NULL COMMENT '机构编码',
  `ParentIdList` 	varchar(512) DEFAULT NULL COMMENT '父节点集合',
  `Layer` 			int(11) NOT NULL DEFAULT '0' COMMENT '部门层级',
  `Sort` 			int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `Status` 			tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态',
  `LeaderUser` 		varchar(64) DEFAULT NULL COMMENT '部门负责人',
  `LeaderMobile` 	varchar(32) DEFAULT NULL COMMENT '联系电话',
  `LeaderEmail` 	varchar(64) DEFAULT NULL COMMENT '联系邮箱',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='组织机构表';

-- ----------------------------
-- Records of sys_organize
-- ----------------------------
BEGIN;
INSERT INTO `sys_organize` VALUES (1300000000001, 0, '集团总部', '10001', '[0]', 1, 1, 1, 0, 'admin', '15888888888', 'digital_mes@163.com', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `Name` 			varchar(32) NOT NULL COMMENT '角色名称',
  `ParentId` 		bigint(20) DEFAULT NULL COMMENT '角色父节点',
  `ParentIdList` 	varchar(512) DEFAULT NULL COMMENT '父节点结合',
  `Layer` 			int(11) NOT NULL DEFAULT '1' COMMENT '角色层级',
  `Number` 			varchar(16) DEFAULT NULL COMMENT '角色编号',
  `IsSystem` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否超级管理员',
  `Status` 			tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `MaxLength` 		int(11) NOT NULL DEFAULT '0' COMMENT '角色设置最大数量',
  `Sort` 			int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `Summary` 		varchar(512) DEFAULT NULL COMMENT '描述',
  `Console` 		varchar(64) DEFAULT NULL COMMENT '控制台',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1300000000001, '管理员', 0, '[1300000000001]', 1, '100001', 0, 1, 0, 1, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000002, '系统管理员', 1300000000001, '[1300000000001,1300000000002]', 2, '100002', 0, 1, 1, 2, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2023-02-06 14:54:55', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000003, '业务管理员', 1300000000001, '[1300000000001,1300000000003]', 2, '100003', 0, 1, 0, 3, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '0001-01-01 00:00:00', 'admin', 0);

INSERT INTO `sys_role` VALUES (1300000000011, '操作员', 1300000000011, '[1300000000011]', 1, '100011', 0, 1, 0, 11, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000012, '工艺人员', 1300000000011, '[1300000000011,1300000000012]', 2, '100012', 0, 1, 0, 12, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000013, '生产人员', 1300000000011, '[1300000000011,1300000000013]', 2, '100013', 0, 1, 0, 13, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000014, '质检员', 1300000000011, '[1300000000011,1300000000014]', 2, '100014', 0, 1, 0, 14, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_role` VALUES (1300000000015, '返修人员', 1300000000011, '[1300000000011,1300000000015]', 2, '100015', 0, 1, 0, 15, '', 'work', 0, '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_conflict
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_conflict`;
CREATE TABLE `sys_role_conflict` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  `RoleA` 		bigint(20) NOT NULL COMMENT '角色A',
  `RoleB` 		bigint(20) NOT NULL COMMENT '角色B',
  `Summary` 	varchar(255) DEFAULT NULL COMMENT '互斥说明',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色互斥表';

-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `RoleId` 		bigint(20) NOT NULL COMMENT '角色编号',
  `MenuId` 		bigint(20) DEFAULT NULL COMMENT '菜单编号',
  `Api` 		varchar(2048) DEFAULT NULL COMMENT '按钮功能组',
  `Types` 		int(11) NOT NULL DEFAULT '1' COMMENT '授权类型1=角色-菜单 2=用户-角色 3=角色-菜单-按钮功能',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='授权表';

-- ----------------------------
-- Records of sys_permission
-- ----------------------------
BEGIN;
INSERT INTO `sys_permission` VALUES (1300000000001, 1300000000002, 1300000000001, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000002, 1300000000002, 1300000000002, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000003, 1300000000002, 1300000000003, '[{\"name\":\"账号信息修改\",\"code\":\"editaccount\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/basic\"},{\"name\":\"修改密码\",\"code\":\"editpassword\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/settingpwd\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000004, 1300000000002, 1300000000004, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000005, 1300000000002, 1300000000005, '[]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000011, 1300000000002, 1300000000011, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000012, 1300000000002, 1300000000012, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"\"},{\"name\":\"详情\",\"code\":\"info\",\"method\":\"GET\",\"url\":\"\"},{\"name\":\"密码重置\",\"code\":\"reset\",\"method\":\"PUT\",\"url\":\"\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000013, 1300000000002, 1300000000013, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysmenu/temp\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysmenu\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmenu\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000014, 1300000000002, 1300000000014, '[{\"name\":\"保存\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syspermission\"}]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000100, 1300000000002, 1300000000100, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000101, 1300000000002, 1300000000101, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000102, 1300000000002, 1300000000102, '[{\"name\":\"查看\",\"code\":\"look\",\"method\":\"POST\",\"url\":\"/api/generator\"},{\"name\":\"生成\",\"code\":\"generate\",\"method\":\"POST\",\"url\":\"/api/generator\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000103, 1300000000002, 1300000000103, '[{\"name\":\"上传\",\"code\":\"upload\",\"method\":\"POST\",\"url\":\"/api/sysfile/upload\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysfile/file\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000104, 1300000000002, 1300000000104, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysquartz\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysquartz\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysquartz\"},{\"name\":\"暂停\",\"code\":\"pause\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/pausejob\"},{\"name\":\"开启\",\"code\":\"start\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/startjob\"},{\"name\":\"执行\",\"code\":\"execute\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/runjob\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000105, 1300000000002, 1300000000105, '[{\"name\":\"新建\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysnotice\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysnotice\"},{\"name\":\"已读\",\"code\":\"readok\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/read\"},{\"name\":\"未读\",\"code\":\"readno\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/clearread\"},{\"name\":\"状态\",\"code\":\"status\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/status\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000106, 1300000000002, 1300000000106, '[{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmessage\"},{\"name\":\"已读\",\"code\":\"read\",\"method\":\"PUT\",\"url\":\"/api/sysmessage/read\"},{\"name\":\"回收站\",\"code\":\"recycle\",\"method\":\"DELETE\",\"url\":\"/api/sysmessage/recycle\"},{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000107, 1300000000002, 1300000000107, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysworkflow\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysworkflow\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysworkflow\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000108, 1300000000002, 1300000000108, '[]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000121, 1300000000002, 1300000000121, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000122, 1300000000002, 1300000000122, '[{"name":"添加栏目","code":"add","method":"POST","url":"/api/syscodetype"},{"name":"编辑栏目","code":"edit","method":"PUT","url":"/api/syscodetype"},{"name":"删除栏目","code":"delete","method":"DELETE","url":"/api/syscodetype"},{"name":"添加字典","code":"addcode","method":"POST","url":"/api/syscode"},{"name":"编辑字典","code":"editcode","method":"PUT","url":"/api/syscode"},{"name":"删除字典","code":"deletecode","method":"DELETE","url":"/api/syscode"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000123, 1300000000002, 1300000000123, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syscity\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/syscity\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syscity\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000124, 1300000000002, 1300000000124, '[{\"name\":\"保存\",\"code\":\"save\",\"method\":\"POST\",\"url\":\"/api/syssafety\"}]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000131, 1300000000002, 1300000000131, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000132, 1300000000002, 1300000000132, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysorganize\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysorganize\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysorganize\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000133, 1300000000002, 1300000000133, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysrole\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysrole\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysrole\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000134, 1300000000002, 1300000000134, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syspost\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/syspost\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syspost\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000135, 1300000000002, 1300000000135, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysadmin\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysadmin\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysadmin\"},{\"name\":\"密码重置\",\"code\":\"reset\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/passreset\"},{\"name\":\"分配角色\",\"code\":\"role\",\"method\":\"POST\",\"url\":\"/api/syspermission/role\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000136, 1300000000002, 1300000000136, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysmenu/temp\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysmenu\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmenu\"}]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000141, 1300000000002, 1300000000141, '[]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000142, 1300000000002, 1300000000142, '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysroleconflict\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysroleconflict\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysroleconflict\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000143, 1300000000002, 1300000000143, '[{\"name\":\"保存\",\"code\":\"save\",\"method\":\"POST\",\"url\":\"/api/syspermission\"}]', 3, 0);

INSERT INTO `sys_permission` VALUES (1300000000146, 1300000000002, 1300000000146, '[{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syslog\"},{\"name\":\"清空\",\"code\":\"clear\",\"method\":\"DELETE\",\"url\":\"/api/syslog/clear\"}]', 3, 0);
INSERT INTO `sys_permission` VALUES (1300000000147, 1300000000002, 1300000000147, '[]', 3, 0);

COMMIT;

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `Name` 		varchar(32) NOT NULL COMMENT '岗位名称',
  `Number` 		varchar(16) DEFAULT NULL COMMENT '岗位编码',
  `Sort` 		int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `Status` 		tinyint(1) NOT NULL DEFAULT '1' COMMENT '岗位状态',
  `IsDel` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态',
  `Summary` 	varchar(512) DEFAULT NULL COMMENT '备注信息',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='岗位表';

-- ----------------------------
-- Records of sys_post
-- ----------------------------
BEGIN;
INSERT INTO `sys_post` VALUES (1300000000001, '项目经理', '10001', 1, 1, 0, '项目经理', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_post` VALUES (1300000000002, '生产经理', '10002', 2, 1, 0, '生产经理', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_post` VALUES (1300000000003, '质量经理', '10003', 2, 1, 0, '质量经理', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_admin
-- ----------------------------
DROP TABLE IF EXISTS `sys_admin`;
CREATE TABLE `sys_admin` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户',
  `PostGroup` 		varchar(256) DEFAULT NULL COMMENT '所属岗位',
  `OrganizeId` 		bigint(20) NOT NULL COMMENT '所属部门',
  `LoginAccount` 	varchar(64) NOT NULL COMMENT '登录账号',
  `LoginPassWord` 	varchar(256) NOT NULL COMMENT '登录密码',
  `Avatar` 			varchar(256) DEFAULT NULL COMMENT '头像',
  `FullName` 		varchar(64) NOT NULL COMMENT '姓名',
  `Mobile` 			varchar(32) DEFAULT NULL COMMENT '手机号码',
  `Email` 			varchar(64) DEFAULT NULL COMMENT '邮箱',
  `Sex` 			varchar(16) DEFAULT NULL COMMENT '性别',
  `Status` 			tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `Summary` 		varchar(256) DEFAULT NULL COMMENT '备注',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `LoginTime` 		datetime DEFAULT NULL COMMENT '登录时间',
  `UpLoginTime` 	datetime DEFAULT NULL COMMENT '上次登录时间',
  `LoginCount` 		int(11) NOT NULL DEFAULT '0' COMMENT '登录次数',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员表';

-- ----------------------------
-- Records of sys_admin
-- ----------------------------
BEGIN;
INSERT INTO `sys_admin` VALUES (1300000000001, 0, '[1300000000001]', 1300000000001, 'admin', 'ivwNEeYBP66vc/uptFBwAu9yC6KlOirGzGD3NZQIMgYyMDzI5Li/lgLaR8wc7Bw8', '/avatars/default.jpg', '管理员', '15888888888', '15888888888@163.com', '男', 1, 0, '数字化革命', '2022-02-22 22:22:22', 'admin', NULL, NULL, NULL, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_admin_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_admin_role`;
CREATE TABLE `sys_admin_role` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  `AdminId` 	bigint(20) NOT NULL COMMENT '用户编号',
  `RoleId` 		bigint(20) NOT NULL COMMENT '角色编号',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色关系表';

-- ----------------------------
-- Records of sys_admin_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_admin_role` VALUES (1300000000001, 0, 1300000000001, 1300000000002, '2022-02-22 22:22:22', 'admin', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `Name` 			varchar(32) NOT NULL COMMENT '菜单名称',
  `ParentId` 		bigint(20) DEFAULT NULL COMMENT '父节点',
  `ParentIdList` 	varchar(256) DEFAULT NULL COMMENT '父节点集合组',
  `Code` 			varchar(30) DEFAULT NULL COMMENT '权限标识',
  `Layer` 			int(11) NOT NULL DEFAULT '1' COMMENT '菜单层级',
  `Urls` 			varchar(128) DEFAULT NULL COMMENT '路由地址',
  `Redirect` 		varchar(128) DEFAULT NULL COMMENT '重定向',
  `VuePath` 		varchar(128) DEFAULT NULL COMMENT 'Vue文件路径',
  `Icon` 			varchar(64) DEFAULT NULL COMMENT '菜单图标',
  `Active` 			varchar(128) DEFAULT NULL COMMENT '菜单高亮',
  `Color` 			varchar(32) DEFAULT NULL COMMENT '颜色',
  `Sort` 			int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `Fullpage` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否全屏',
  `Status` 			tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `Types` 			varchar(32) NOT NULL DEFAULT '1' COMMENT '菜单类型',
  `Api` 			varchar(2048) DEFAULT NULL COMMENT '接口权限',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='资源菜单表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
-- 主页
INSERT INTO `sys_menu` VALUES (1300000000001, '主页', 0, '[1300000000001]', 'home', 1, '/home', NULL, NULL, 'el-icon-house', NULL, NULL, 1, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000002, '工作台', 1300000000001, '[1300000000001,1300000000002]', 'dashboard', 1, '/dashboard', NULL, 'home', 'el-icon-menu', NULL, NULL, 2, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000003, '个人信息', 1300000000001, '[1300000000001,1300000000003]', 'userCenter', 1, '/usercenter', NULL, 'userCenter', 'el-icon-user', NULL, NULL, 3, 0, 1, 0, 'menu', '[{\"name\":\"账号信息修改\",\"code\":\"editaccount\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/basic\"},{\"name\":\"修改密码\",\"code\":\"editpassword\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/settingpwd\"}]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000004, '系统监控', 1300000000001, '[1300000000001,1300000000004]', 'monitoring', 1, '/monitoring', NULL, 'home/monitoring', 'el-icon-data-line', NULL, NULL, 103, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000005, '接口文档', 1300000000001, '[1300000000001,1300000000005]', 'api-doc', 1, 'http://localhost:5000/fytapiui/index.html', NULL, NULL, 'el-icon-document', NULL, NULL, 4, 0, 1, 0, 'link', '[]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);

-- 租户
INSERT INTO `sys_menu` VALUES (1300000000011, '租户', 0, '[1300000000011]', 'tenant', 1, '/tenant', NULL, NULL, 'el-icon-basketball', NULL, NULL, 11, 0, 1, 0, 'menu', '[]', '2022-11-04 09:47:41', '李四', '2022-11-04 09:48:03', '李四', 0);
INSERT INTO `sys_menu` VALUES (1300000000012, '租户管理', 1300000000011, '[1300000000011,1300000000012]', 'tenanthome', 1, '/tenant/home', NULL, 'tenant/index', 'el-icon-help', NULL, NULL, 12, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"\"},{\"name\":\"详情\",\"code\":\"info\",\"method\":\"GET\",\"url\":\"\"},{\"name\":\"密码重置\",\"code\":\"reset\",\"method\":\"PUT\",\"url\":\"\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000013, '租户资源', 1300000000011, '[1300000000011,1300000000013]', 'tenantmenu', 1, '/tenant/menu', NULL, 'tenant/menu', 'el-icon-fold', NULL, NULL, 13, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysmenu/temp\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysmenu\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmenu\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000014, '租户权限', 1300000000011, '[1300000000011,1300000000014]', 'tenantauthority', 1, '/tenant/authority', NULL, 'tenant/authority', 'el-icon-finished', NULL, NULL, 14, 0, 1, 0, 'menu', '[{\"name\":\"保存\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syspermission\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

-- 设置
INSERT INTO `sys_menu` VALUES (1300000000100, '设置', 0, '[1300000000100]', 'setting', 1, '/setting', NULL, NULL, 'el-icon-setting', NULL, NULL, 100, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

-- 设置-组件中心
INSERT INTO `sys_menu` VALUES (1300000000101, '组件中心', 1300000000100, '[1300000000101]', 'modules', 1, '/modules', NULL, NULL, 'el-icon-takeaway-box', NULL, NULL, 101, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000102, '代码生成器', 1300000000101, '[1300000000101,1300000000102]', 'generate', 1, '/modules/generate', NULL, 'modules/generate', 'sc-icon-code', NULL, NULL, 102, 0, 1, 0, 'menu', '[{\"name\":\"查看\",\"code\":\"look\",\"method\":\"POST\",\"url\":\"/api/generator\"},{\"name\":\"生成\",\"code\":\"generate\",\"method\":\"POST\",\"url\":\"/api/generator\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000103, '资源库管理', 1300000000101, '[1300000000101,1300000000103]', 'sysfile', 1, '/sys/file', NULL, 'sys/file', 'el-icon-folder-checked', NULL, NULL, 103, 0, 1, 0, 'menu', '[{\"name\":\"上传\",\"code\":\"upload\",\"method\":\"POST\",\"url\":\"/api/sysfile/upload\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysfile/file\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000104, '任务调度', 1300000000101, '[1300000000101,1300000000104]', 'modulestask', 1, '/modules/task', NULL, 'modules/task', 'el-icon-alarm-clock', NULL, NULL, 104, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysquartz\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysquartz\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysquartz\"},{\"name\":\"暂停\",\"code\":\"pause\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/pausejob\"},{\"name\":\"开启\",\"code\":\"start\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/startjob\"},{\"name\":\"执行\",\"code\":\"execute\",\"method\":\"PUT\",\"url\":\"/api/sysquartz/runjob\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000105, '通知管理', 1300000000101, '[1300000000101,1300000000105]', 'sysnotice', 1, '/sys/notice', NULL, 'sys/notice', 'el-icon-message', NULL, NULL, 105, 0, 1, 0, 'menu', '[{\"name\":\"新建\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysnotice\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysnotice\"},{\"name\":\"已读\",\"code\":\"readok\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/read\"},{\"name\":\"未读\",\"code\":\"readno\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/clearread\"},{\"name\":\"状态\",\"code\":\"status\",\"method\":\"PUT\",\"url\":\"/api/sysnotice/status\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000106, '消息管理', 1300000000101, '[1300000000101,1300000000106]', 'sysmessage', 1, '/sys/message', NULL, 'sys/message', 'el-icon-bell', NULL, NULL, 106, 0, 1, 0, 'menu', '[{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmessage\"},{\"name\":\"已读\",\"code\":\"read\",\"method\":\"PUT\",\"url\":\"/api/sysmessage/read\"},{\"name\":\"回收站\",\"code\":\"recycle\",\"method\":\"DELETE\",\"url\":\"/api/sysmessage/recycle\"},{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000107, '工作流管理', 1300000000101, '[1300000000101,1300000000107]', 'sysworkflow', 1, '/sys/workflow', NULL, 'sys/workflow', 'sc-icon-organization', NULL, NULL, 107, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysworkflow\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysworkflow\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysworkflow\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000108, '工作流设计', 1300000000107, '[1300000000107,1300000000108]', 'sysworkflowdesign', 1, '/sys/workflow/design', NULL, 'sys/workflow/design', 'sc-icon-organization', NULL, NULL, 108, 1, 0, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

-- 设置-配置中心
INSERT INTO `sys_menu` VALUES (1300000000121, '配置中心', 1300000000100, '[1300000000121]', 'setting', 1, '/setting', NULL, NULL, 'el-icon-setting', NULL, NULL, 121, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000122, '数据字典', 1300000000121, '[1300000000111,1300000000122]', 'syscode', 1, '/sys/code', NULL, 'sys/code', 'el-icon-document-copy', NULL, NULL, 122, 0, 1, 0, 'menu', '[{\"name\":\"添加栏目\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syscodetype\"},{\"name\":\"编辑栏目\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/syscodetype\"},{\"name\":\"删除栏目\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syscodetype\"},{\"name\":\"添加字典\",\"code\":\"addcode\",\"method\":\"POST\",\"url\":\"/api/syscode\"},{\"name\":\"编辑字典\",\"code\":\"editcode\",\"method\":\"PUT\",\"url\":\"/api/syscode\"},{\"name\":\"删除字典\",\"code\":\"deletecode\",\"method\":\"DELETE\",\"url\":\"/api/syscode\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000123, '城市区域', 1300000000121, '[1300000000111,1300000000123]', 'syscity', 1, '/sys/city', NULL, 'sys/city', 'el-icon-aim', NULL, NULL, 123, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syscity\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/syscity\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syscity\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000124, '安全设置', 1300000000121, '[1300000000111,1300000000124]', 'syssafety', 1, '/sys/safety', NULL, 'sys/safety', 'el-icon-key', NULL, NULL, 124, 0, 1, 0, 'menu', '[{\"name\":\"保存\",\"code\":\"save\",\"method\":\"POST\",\"url\":\"/api/syssafety\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

-- 设置-组织成员
INSERT INTO `sys_menu` VALUES (1300000000131, '组织成员', 1300000000100, '[1300000000131]', 'sys', 1, '/sys', NULL, NULL, 'el-icon-sunset', NULL, NULL, 131, 0, 1, 0, 'menu', '[]', '2022-03-21 11:47:29', NULL, NULL, NULL, 0);
INSERT INTO `sys_menu` VALUES (1300000000132, '机构管理', 1300000000131, '[1300000000131,1300000000132]', 'sysorganize', 1, '/sys/organize', NULL, 'sys/organize', 'el-icon-place', NULL, NULL, 132, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysorganize\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysorganize\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysorganize\"}]', '2022-02-22 22:22:22', NULL, '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000133, '角色管理', 1300000000131, '[1300000000131,1300000000133]', 'sysrole', 1, '/sys/role', NULL, 'sys/role', 'el-icon-notebook', NULL, NULL, 133, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysrole\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysrole\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysrole\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000134, '职位管理', 1300000000131, '[1300000000131,1300000000134]', 'syspost', 1, '/sys/post', NULL, 'sys/post', 'el-icon-monitor', NULL, NULL, 134, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/syspost\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/syspost\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syspost\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000135, '用户管理', 1300000000131, '[1300000000131,1300000000135]', 'sysadmin', 1, '/sys/admin', NULL, 'sys/admin', 'el-icon-user', NULL, NULL, 135, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysadmin\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysadmin\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysadmin\"},{\"name\":\"密码重置\",\"code\":\"reset\",\"method\":\"PUT\",\"url\":\"/api/sysadmin/passreset\"},{\"name\":\"分配角色\",\"code\":\"role\",\"method\":\"POST\",\"url\":\"/api/syspermission/role\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000136, '资源管理', 1300000000131, '[1300000000131,1300000000136]', 'sysmenu', 1, '/sys/menu', NULL, 'sys/menu', 'el-icon-expand', NULL, NULL, 136, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysmenu/temp\"},{\"name\":\"编辑\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysmenu\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysmenu\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
-- 设置-组织成员-权限管理
INSERT INTO `sys_menu` VALUES (1300000000141, '权限管理', 1300000000131, '[1300000000131,1300000000141]', 'syspermission-manager', 1, '/sys/permission-manager', NULL, '', 'el-icon-finished', NULL, NULL, 141, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000142, '角色互斥', 1300000000141, '[1300000000141,1300000000142]', 'sys-roleconflict', 1, '/sys/roleconflict', NULL, 'sys/roleconflict', 'el-icon-sort', NULL, NULL, 142, 0, 1, 0, 'menu', '[{\"name\":\"添加\",\"code\":\"add\",\"method\":\"POST\",\"url\":\"/api/sysroleconflict\"},{\"name\":\"修改\",\"code\":\"edit\",\"method\":\"PUT\",\"url\":\"/api/sysroleconflict\"},{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/sysroleconflict\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000143, '权限设置', 1300000000141, '[1300000000141,1300000000143]', 'syspermission', 1, '/sys/permission', NULL, 'sys/permission', 'el-icon-setting', NULL, NULL, 143, 0, 1, 0, 'menu', '[{\"name\":\"保存\",\"code\":\"save\",\"method\":\"POST\",\"url\":\"/api/syspermission\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

INSERT INTO `sys_menu` VALUES (1300000000146, '系统日志', 1300000000131, '[1300000000131,1300000000146]', 'syslog', 1, '/sys/log', NULL, 'sys/log', 'el-icon-document-copy', NULL, NULL, 146, 0, 1, 0, 'menu', '[{\"name\":\"删除\",\"code\":\"delete\",\"method\":\"DELETE\",\"url\":\"/api/syslog\"},{\"name\":\"清空\",\"code\":\"clear\",\"method\":\"DELETE\",\"url\":\"/api/syslog/clear\"}]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);
INSERT INTO `sys_menu` VALUES (1300000000147, '在线用户', 1300000000131, '[1300000000131,1300000000147]', 'sysonline', 1, '/sys/online', NULL, 'sys/online', 'el-icon-discount', NULL, NULL, 147, 0, 1, 0, 'menu', '[]', '2022-02-22 22:22:22', 'admin', '2022-02-22 22:22:22', 'admin', 0);

COMMIT;


-- ----------------------------
-- Table structure for sys_message
-- ----------------------------
DROP TABLE IF EXISTS `sys_message`;
CREATE TABLE `sys_message` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `ColumnId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '栏目Id',
  `Types` 		int(11) NOT NULL DEFAULT '1' COMMENT '类型',
  `Title` 		varchar(64) DEFAULT NULL COMMENT '留言标题',
  `Email` 		varchar(64) DEFAULT NULL COMMENT '邮箱信息',
  `Mobile` 		varchar(32) DEFAULT NULL COMMENT '手机号码',
  `Tags` 		varchar(128) DEFAULT NULL COMMENT '留言标签',
  `Summary` 	varchar(1024) DEFAULT NULL COMMENT '留言内容',
  `IsRead` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读',
  `IsDelete` 	tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `UserId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '用户编号',
  `UserName` 	varchar(64) DEFAULT NULL COMMENT '用户姓名',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '添加人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='留言消息表';

-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice` (
  `Id` 				bigint(20) NOT NULL DEFAULT '0' COMMENT '唯一编号',
  `TenantId` 		bigint(20) DEFAULT NULL,
  `SendUserId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '发送人编号',
  `AcceptUserIds` 	varchar(2048) NOT NULL DEFAULT '0' COMMENT '接收人编号(0=全员)',
  `Title` 			varchar(256) NOT NULL COMMENT '通知标题',
  `Content` 		longtext COMMENT '通知内容',
  `Files` 			varchar(1024) DEFAULT NULL COMMENT '附件内容支持多个',
  `Status` 			int(11) NOT NULL DEFAULT '0' COMMENT '1=草稿2=存档3=删除',
  `IsSend` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为发送邮件',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知模块';

-- ----------------------------
-- Table structure for sys_notice_read
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice_read`;
CREATE TABLE `sys_notice_read` (
  `Id` 			bigint(20) NOT NULL DEFAULT '0' COMMENT '唯一编号',
  `NoticeId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '通知编号',
  `UserId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '用户编号',
  `IsRead` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知已读模块';

-- ----------------------------
-- Table structure for sys_calendar
-- ----------------------------
DROP TABLE IF EXISTS `sys_calendar`;
CREATE TABLE `sys_calendar` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `TenantId` 	bigint(20) DEFAULT NULL,
  `Title` 		varchar(256) NOT NULL COMMENT '日程标题',
  `TypeId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '日程类型',
  `LevelId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '日程等级',
  `StartTime` 	datetime NOT NULL COMMENT '开始时间',
  `EndTime` 	datetime NOT NULL COMMENT '结束时间',
  `UserIds` 	varchar(900) DEFAULT NULL COMMENT '参与人列表',
  `ToBusiness` 	varchar(900) DEFAULT NULL COMMENT '关联业务',
  `Remind` 		varchar(255) DEFAULT NULL COMMENT '提醒设置',
  `CreateTime` 	datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日程表';

-- ----------------------------
-- Table structure for sys_scheduler
-- ----------------------------
DROP TABLE IF EXISTS `sys_scheduler`;
CREATE TABLE `sys_scheduler` (
  `Id` 					bigint(20) NOT NULL COMMENT '唯一编号',
  `JobName` 			varchar(255) NOT NULL COMMENT '任务名称',
  `JobGroup` 			varchar(255) NOT NULL COMMENT '任务组',
  `BeginTime` 			datetime NOT NULL COMMENT '开始时间',
  `EndTime` 			datetime DEFAULT NULL COMMENT '结束时间',
  `Cron` 				varchar(255) NOT NULL COMMENT 'Cron表达式',
  `TriggerType` 		int(11) NOT NULL DEFAULT '1' COMMENT '触发器类型',
  `RequestUrl` 			varchar(255) DEFAULT NULL COMMENT '请求url',
  `RequestParameters` 	varchar(1024) DEFAULT NULL COMMENT '请求参数（Post，Put请求用）',
  `Headers` 			varchar(1024) DEFAULT NULL COMMENT 'Headers',
  `RequestType` 		int(11) NOT NULL DEFAULT '2' COMMENT '请求类型',
  `Description` 		varchar(255) DEFAULT NULL COMMENT '描述',
  `TriggerState` 		int(11) DEFAULT '0' COMMENT '任务状态',
  `LastErrMsg` 			varchar(1024) DEFAULT NULL COMMENT '上次执行异常信息',
  `PreviousFireTime` 	datetime DEFAULT NULL COMMENT '上次执行时间',
  `NextFireTime` 		datetime DEFAULT NULL COMMENT '下次执行时间',
  `CreateTime` 			datetime NOT NULL,
  `TenantId` 			bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务调度';

-- ----------------------------
-- Table structure for sys_workflow
-- ----------------------------
DROP TABLE IF EXISTS `sys_workflow`;
CREATE TABLE `sys_workflow` (
  `Id` 			bigint(20) NOT NULL COMMENT '唯一编号',
  `TypeId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '流程类型',
  `Title` 		varchar(255) NOT NULL COMMENT '流程名称',
  `Icon` 		varchar(64) NOT NULL COMMENT '图标',
  `Refused` 	int(11) NOT NULL DEFAULT '1' COMMENT '审批被拒后状态',
  `Status` 		tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `Summary` 	varchar(512) DEFAULT NULL COMMENT '流程说明',
  `Flow` 		longtext NOT NULL COMMENT '具体流程Json',
  `CreateTime` 	datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `CreateUser` 	varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 	datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 	varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 	bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作流';


-- ----------------------------
-- Table structure for sys_codetype
-- ----------------------------
DROP TABLE IF EXISTS `sys_codetype`;
CREATE TABLE `sys_codetype` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `ParentId` 		bigint(20) NOT NULL COMMENT '父节点',
  `ParentIdList` 	varchar(512) DEFAULT NULL,
  `Layer` 			int(11) NOT NULL DEFAULT '1' COMMENT '层级',
  `Name` 			varchar(32) DEFAULT NULL COMMENT '分类名称',
  `Code` 			varchar(64) DEFAULT NULL COMMENT '标识',
  `Types` 			int(11) NOT NULL DEFAULT '1' COMMENT '1=系统 2=商城',
  `Sort` 			int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `IsSystem` 		tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统内置集成',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典分类信息';

-- ----------------------------
-- Table structure for sys_code
-- ----------------------------
DROP TABLE IF EXISTS `sys_code`;
CREATE TABLE `sys_code` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一编号',
  `TypeId` 			bigint(20) NOT NULL COMMENT '分类编号',
  `Tag` 			int(11) NOT NULL DEFAULT '1' COMMENT '对应CodeType的Type',
  `Name` 			varchar(64) NOT NULL COMMENT '字典值名称',
  `CodeValues` 		varchar(64) DEFAULT NULL COMMENT '字典值阈值',
  `Sort` 			int(11) NOT NULL DEFAULT '1' COMMENT '排序',
  `Status` 			tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `IsDel` 			tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `Summary` 		varchar(128) DEFAULT NULL COMMENT '备注',
  `CreateTime` 		datetime NOT NULL COMMENT '创建时间',
  `CreateUser` 		varchar(64) DEFAULT NULL COMMENT '创建人',
  `UpdateTime` 		datetime DEFAULT NULL COMMENT '修改时间',
  `UpdateUser` 		varchar(64) DEFAULT NULL COMMENT '修改人',
  `TenantId` 		bigint(50) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典信息表';

-- ----------------------------
-- Table structure for sys_city
-- ----------------------------
DROP TABLE IF EXISTS `sys_city`;
CREATE TABLE `sys_city` (
  `Id` 				bigint(20) NOT NULL COMMENT '唯一标识',
  `Name` 			varchar(64) NOT NULL COMMENT '城市名称',
  `ParentId` 		bigint(20) NOT NULL DEFAULT '1' COMMENT '所属上级',
  `ParentIdList` 	varchar(512) DEFAULT NULL COMMENT '所属上级组',
  `Layer` 			int(11) NOT NULL DEFAULT '1' COMMENT '层级',
  `Code` 			varchar(32) DEFAULT NULL COMMENT '城市编号',
  `Longitude` 		varchar(64) DEFAULT NULL COMMENT '经度',
  `Dimension` 		varchar(64) DEFAULT NULL COMMENT '维度',
  `Sort` 			int(11) DEFAULT '1' COMMENT '排序',
  `AddTime` 		datetime NOT NULL COMMENT '添加时间',
  `TenantId` 		bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='城市表';

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `Id` 					bigint(20) NOT NULL,
  `Level` 				varchar(20) DEFAULT NULL COMMENT '级别',
  `LogType` 			int(11) NOT NULL COMMENT '日志类型  1=登录  2=操作',
  `Module` 				varchar(128) DEFAULT NULL COMMENT '操作模块',
  `OperateType` 		varchar(32) DEFAULT NULL COMMENT '操作类型:例如添加、修改',
  `Method` 				varchar(16) DEFAULT NULL COMMENT '提交类型：get/post/delete',
  `OperateUser` 		varchar(64) DEFAULT NULL COMMENT '操作人',
  `IP` 					varchar(32) DEFAULT NULL COMMENT 'IP',
  `Parameters` 			longtext COMMENT '请求参数',
  `Address` 			varchar(512) DEFAULT NULL COMMENT '操作地址',
  `Status` 				bit(1) NOT NULL DEFAULT b'1' COMMENT '操作状态',
  `Message` 			varchar(2048) DEFAULT NULL COMMENT '详细信息',
  `ReturnValue` 		longtext COMMENT '返回结果',
  `OperateTime` 		datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `Browser` 			varchar(1024) DEFAULT NULL COMMENT '浏览器信息',
  `ExecutionDuration` 	int(11) NOT NULL DEFAULT '0' COMMENT '执行时长',
  `TenantId` 			bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
  PRIMARY KEY (`Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='登录日志&操作日志&任务日志';

SET FOREIGN_KEY_CHECKS = 1;
